﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

namespace TimKen.BussLogic
{
    /// <summary>
    /// 业务逻辑类Address 的摘要说明。
    /// </summary>
    public class Address
    {
        private readonly TimKen.DataAccess.Address dal = new TimKen.DataAccess.Address();
        public Address()
        { }
        #region  成员方法
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(string AddressCode)
        {
            return dal.Exists(AddressCode);
        }

        /// <summary>
        /// 增加一条数据
        /// </summary>
        public void Add(TimKen.DataEntity.Address model)
        {
            dal.Add(model);
        }

        /// <summary>
        /// 更新一条数据
        /// </summary>
        public void Update(TimKen.DataEntity.Address model)
        {
            dal.Update(model);
        }

        /// <summary>
        /// 删除一条数据
        /// </summary>
        public void Delete(string AddressCode)
        {

            dal.Delete(AddressCode);
        }

        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public TimKen.DataEntity.Address GetModel(string AddressCode)
        {

            return dal.GetModel(AddressCode);
        }

        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetList(string strWhere)
        {
            return dal.GetList(strWhere);
        }

        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetAllList()
        {
            return GetList("");
        }

        /// <summary>
        /// 获得数据列表
        /// </summary>
        //public DataSet GetList(int PageSize,int PageIndex,string strWhere)
        //{
        //return dal.GetList(PageSize,PageIndex,strWhere);
        //}

        #endregion  成员方法
    }
}
